{extend name="public/base"}

{block name="title"}
用户中心
{/block}

{block name="style"}
{css href="/static/wechat/css/center.css" /}
{/block}

{block name="body"}
<div class="pageControl center">
    <div class="msui_nav msui_navTop">
        <a class="msui_navTop-back" href="{:url('index/index')}"><i class="micon-back"></i></a>
        <h1 class="msui_navTop-title">个人中心</h1>
        <a class="msui_navTop-icon" href="{:url('message/index', ['type' => 0])}">
            {gt name="member.new_msg_num|default=0" value="0"}
            <i class="to_messages"></i>
            {else /}
            <i class="micon-message"></i>
            {/gt}
        </a>
    </div>
    <div class="weui-top">
        <div class="msui_table msui_tableCom">
            <a class="msui_tabCell-img msui_tableImg-circle" href="{:url('member_role_info/save_role_info', ['type' => 0])}">

                <img src="{$member.headimgurl|get_img_url}"  />
            </a>
            <div class="msui_tabCell-content">
                <p class="fs085 cl-3333">{$member.nickname|default='匿名'}</p>
                <p class="fs075 cl-9999">{$member.my_car|default='还未添加爱车'}</p>
            </div>
            <div class="msui_tabCell-button">
                <i class="micon-sign"></i>
            </div>
        </div>
        <div class="weui-flex balance">
            <a class="weui-flex__item" href="{:url('registration/index')}">
                <p class="fs085 cl-3333">{$member.point|default=0}</p>
                <span class="fs08 cl-9999">摩豆</span>
            </a>
            <a class="weui-flex__item" href="{:url('coupon/coupon_list')}">
                <p class="fs085 cl-3333">{$member.coupon_count|default=0}</p>
                <span class="fs08 cl-9999">优惠券</span>
            </a>
            <a class="weui-flex__item" href="{:url('wallet/index')}">
                <p class="fs085 cl-3333">{$member.money|default=0}</p>
                <span class="fs08 cl-9999">钱包</span>
            </a>
        </div>
        <div class="weui-cells">
            <a class="weui-cell weui-cell_access" href="{:url('orders/index')}">
                <div class="weui-cell__hd"><img src="/static/wechat/images/order.png"></div>
                <div class="weui-cell__bd">
                    <p class="fs08 cl-3333">全部订单</p>
                </div>
                <div class="weui-cell__ft"></div>
            </a>
        </div>
        <div class="weui-flex allOrder">
            <a class="weui-flex__item" href="{:url('orders/index', ['status' => 1])}">
                <i class="micon-robOrder"></i>
                {gt name="member.order_num.dqd" value="0"}
                <i class="micon-tips">{$member.order_num.dqd}</i>
                {/gt}
                <span class="fs07 cl-9999">待抢单</span>
            </a>
            <a class="weui-flex__item" href="{:url('orders/index', ['status' => 11])}">
                <i class="micon-bargain"></i>
                {gt name="member.order_num.yj" value="0"}
                <i class="micon-tips">{$member.order_num.yj}</i>
                {/gt}
                <span class="fs07 cl-9999">议价中</span>
            </a>
            <a class="weui-flex__item" href="{:url('orders/index', ['status' => 2])}">
                <i class="micon-payment"></i>
                {gt name="member.order_num.dfk" value="0"}
                <i class="micon-tips">{$member.order_num.dfk}</i>
                {/gt}
                <span class="fs07 cl-9999">待付款</span>
            </a>
            <a class="weui-flex__item" href="{:url('orders/index', ['status' => 3])}">
                <i class="micon-service"></i>
                {gt name="member.order_num.fwz" value="0"}
                <i class="micon-tips">{$member.order_num.fwz}</i>
                {/gt}
                <span class="fs07 cl-9999">服务中</span>
            </a>
            <!--待评价-->
            <a class="weui-flex__item" href="{:url('orders/index', ['status' => 4])}">
                <i class="micon-confirm"></i>
                {gt name="member.order_num.dqr" value="0"}
                <i class="micon-tips">{$member.order_num.dqr}</i>
                {/gt}
                <span class="fs07 cl-9999">待确认</span>
            </a>
        </div>
        <div class="weui-cells">
            <a class="weui-cell weui-cell_access" href="{:url('austin/index')}">
                <div class="weui-cell__hd"><img src="/static/wechat/images/refund.png"></div>
                <div class="weui-cell__bd">
                    <p class="fs08 cl-3333">退款/售后</p>
                </div>
                <div class="weui-cell__ft">
                    {gt name="member.austin_num" value="0"}
                    <i class="micon-tips2">{$member.austin_num}</i>
                    {/gt}
                </div>
            </a>
            <a class="weui-cell weui-cell_access" href="{:url('austin/complaint_index')}">
                <div class="weui-cell__hd"><img src="/static/wechat/images/complain.png"></div>
                <div class="weui-cell__bd">
                    <p class="fs08 cl-3333">投诉</p>
                </div>
                <div class="weui-cell__ft">
                    {gt name="member.complaint_num" value="0"}
                    <i class="micon-tips2">{$member.complaint_num}</i>
                    {/gt}
                </div>
            </a>
            <a class="weui-cell weui-cell_access" href="{:url('distribution/index', ['type' => 0])}">
                <div class="weui-cell__hd"><img src="/static/wechat/images/mySales.png"></div>
                <div class="weui-cell__bd">
                    <p class="fs08 cl-3333">我的分销</p>
                </div>
                <div class="weui-cell__ft"></div>
            </a>
            <a class="weui-cell weui-cell_access" href="{:url('service/index', ['type' => 0])}">
                <div class="weui-cell__hd"><img src="/static/wechat/images/cService.png"></div>
                <div class="weui-cell__bd">
                    <p class="fs08 cl-3333">客服</p>
                </div>
                <div class="weui-cell__ft"></div>
            </a>
        </div>
        <div class="weui-cells">
            <a class="weui-cell weui-cell_access" href="{:url('set/index', ['type' => 0])}">
                <div class="weui-cell__hd"><img src="/static/wechat/images/set.png"></div>
                <div class="weui-cell__bd">
                    <p>设置</p>
                </div>
                <div class="weui-cell__ft"></div>
            </a>
        </div>
    </div>

</div>
{/block}

{block name="javascript"}
<script>
    $(function () {
        $(".msui_tabCell-button").click(function () {
            window.location.href = "{:url('registration/index')}";
        });

        $.get("{:url('registration/check_registration')}", function (msg) {
            if (msg.code != 200) {
                $(".msui_tabCell-button").html('<i class="micon-sign2"></i>');
            }
        });
    });
</script>
{/block}